/*
     Copyright 2007 Joseph M. Ferner

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

using System;

namespace OpenServers.Net.Common.FileSystem {
    /// <summary>
    /// Base interface for representing a file system object used by <see cref="IFileSystem"/>.
    /// </summary>
    public interface IFileSystemObject {
        /// <summary>
        /// The name of the object.
        /// </summary>
        string Name { get; }

        /// <summary>
        /// The last modified date.
        /// </summary>
        DateTime LastModified { get; }

        /// <summary>
        /// Deletes the object.
        /// </summary>
        void Delete();

        /// <summary>
        /// flag whether the object exists.
        /// </summary>
        bool Exists { get; }

        /// <summary>
        /// The parent object.
        /// </summary>
        IDirectory Parent { get; }

        /// <summary>
        /// flag marking this object as read only.
        /// </summary>
        bool ReadOnly { get; }

        /// <summary>
        /// moves the object to another location.
        /// </summary>
        /// <param name="fso"></param>
        void MoveTo(IFileSystemObject fso);

        /// <summary>
        /// Gets the full path of this object.
        /// </summary>
        string FullPath { get;}
    }
}
